package cn.itcast.hotel.controller;


import cn.itcast.hotel.pojo.PageResult;
import cn.itcast.hotel.pojo.RequestParams;
import cn.itcast.hotel.service.IHotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hotel")
public class HotelController {
    @Autowired
    private IHotelService iHotelService;

    /**
     * @return cn.itcast.hotel.pojo.PageResult
     * @author luli
     * @Description 实现搜索业务
     * @Date 上午 8:38 2023/2/3 0003
     * @Param [requestParams]
     **/
    @PostMapping("/list")
    public PageResult query(@RequestBody RequestParams requestParams) {
        return iHotelService.query(requestParams);
    }
}

